This invention relates to a computer system, and more particularly, to a method of managing a storage medium in a computer system including the storage medium having a limited number of rewrites.
In general information systems, data is regularly backed up. Therefore, if data is lost by a storage system failure, data destruction by a computer virus, an erroneous operation by a user, or the like, the lost data can be recovered.
As one of backup techniques, a backup method using data duplication has been proposed (for example, see U.S. Pat. No. 5,051,887). According to this method, prior to the execution of backup, data used by an application (hereinafter, referred to as “original data”) is duplicated (mirrored) in two storage areas. Then, by suspending the duplication, the backup is executed. As a result, the two storage areas are separated as independent areas. The data in one of the storage areas is handled as the original data, whereas the data in the other storage area is handled as a stored image of the original data at that point of time (hereinafter, referred to as “backup data”). In this manner, high-speed backup is made possible by suspending the duplication.
According to U.S. Pat. No. 5,051,887, under the suspension of the duplication of the original data after the backup data is obtained, data update for the original data is allowed. At the same time, the position of the updated data is recorded. The position of the updated data is a position of the storage area in which the data is written, for example, a block address of a block in which the data is written. To delete the backup data, the duplication of the data is restarted. At the same time, based on the record of the position of the updated data, the updated data is copied from the storage area for storing the original data to the storage area for storing the backup data. As a result, the duplication can be restarted at high speed.
The original data and the backup data described above may be stored in a hard disk drive. However, the original data and the backup data may also be stored in other types of non-volatile storage mediums. One of the other types of non-volatile storage mediums is, for example, a flash memory. The flash memory is data-rewritable. However, it is known that the characteristics of the flash memory are degraded by data rewrite. Therefore, when the flash memory is used as the storage medium, the execution of the number of writes exceeding a predetermined upper limit is not allowed to prevent the occurrence of a failure such as a data loss to ensure predetermined reliability and performance.
In order to prevent write processes from being concentrated in a partial area on the flash memory and to prevent only the partial area from being rapidly deteriorated, a technique of distributing targets of the write process has been disclosed (for example, see JP 2006-504201 A). According to JP 2006-504201 A, a storage area on the flash memory is divided into a plurality of storage areas. Then, data stored in a storage area for which a larger number of rewrites have been executed and data stored in a storage area for which a smaller number of writes have been executed are swapped. As a result, the number of writes are equalized.